#include "wizard.h"
#include <QtGui>

Wizard::Wizard(QWidget *parent)
    : QWizard(parent)
{
    setWindowTitle(tr("HistMQ 2.0 Wizard"));
    setPage(Page_Intro, createIntroPage());
    setStartId(Page_Intro);
}

Wizard::~Wizard()
{

}

QWizardPage *Wizard::createIntroPage()
{
    QWizardPage *page = new QWizardPage;
    page->setPixmap(QWizard::WatermarkPixmap, QPixmap(":/graph/wizard.png"));
    page->setTitle(QWizardPage::tr("Intro"));

    QTextBrowser *tbrowser = new QTextBrowser;
    tbrowser->setFrameShape(QFrame::NoFrame);
    qDebug() << QLocale::system().language();
    tbrowser->setSource(QUrl::fromLocalFile(":/html/intro.html"));

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(tbrowser);
    page->setLayout(layout);

    return page;
}
